const app = getApp()

Page({
  data: {
    msg: "Hello 小程序",
    color: "blue",
    time: 0
  },
  onLoad(options) {
    console.log("page onLoad")
  },
  onShow() {
    console.log("page onShow")
  },
  onReady() {
    console.log("page onReady")
  },
  onHide() {
    console.log("page onHide")
  },
  onPullDownRefresh() {
    console.log("下拉刷新")
  },
  handleClick() {
    app.showLog()
    console.log(app.globalData)

    /*
    this.setData({
      msg: "修改后的值",
      color: "red"
    })
    console.log(this.data.msg)
    setInterval(() => {
      this.timer()
    }, 1000)*/
  },
  timer() {
    this.setData({
      time: this.data.time + 1
    })
  }
  /*
  methods: {
    handleClick() {}
  }*/
})
